From 8bf5b175b1ed63d296b58cbe6e1c39ab2b9cff52 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Mon, 13 Apr 2015 16:15:11 +0200 Subject: [PATCH] gesturesingle: Ignore motion/updates from unhandled sequences This used to do the right thing, practically ignoring those event if they went all through the event handler, unless this motion event triggered the cancellation of this gesture from the event handler of another controllers. In this case, the controller would be reset, but the motion event would still go through its handler, setting again current_button/sequence as the motion event has buttons in its modifiers. This leaves GtkGestureSingle with inconsistent data that may interfere with future runs. https://bugzilla.gnome.org/show_bug.cgi?id=747469 --- gtk/gtkgesturesingle.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gtk/gtkgesturesingle.c b/gtk/gtkgesturesingle.c index 458bffe5ec..5b595c508e 100644 --- a/gtk/gtkgesturesingle.c +++ b/gtk/gtkgesturesingle.c @@ -169,6 +169,8 @@ gtk_gesture_single_handle_event (GtkEventController *controller, button = event->button.button; break; case GDK_MOTION_NOTIFY: + if (!gtk_gesture_handles_sequence (GTK_GESTURE (controller), sequence)) + return FALSE; if (priv->touch_only && !test_touchscreen && source != GDK_SOURCE_TOUCHSCREEN) return FALSE; -- 2.30.2